<template>
  <div id="app">
    <el-container>
      <el-header>Header</el-header>
      <el-container>
        <el-aside width="200px">
          <el-col :span="24">
            <el-menu
              default-active="1"
              class="el-menu-vertical-demo"
              background-color="#d3dce6"
              text-color="#000"
              active-text-color="#ffd04b"
              :router="true"
            >
              <template v-for="(item,index) in navData">
                <el-menu-item :index="item.url" :key="index">
                  <template slot="title">
                    <i :class="item.Icon"></i>
                    <span slot="title">{{item.title}}</span>
                  </template>
                </el-menu-item>
              </template>
            </el-menu>
          </el-col>
        </el-aside>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
// import { getNav } from '../utils/http.js'
import {mapGetters} from 'vuex'
export default {
  name: 'App',
  computed:{
    ...mapGetters(['navData'])
  },
}
</script>

<style scoped>
* {
  padding: 0;
  margin: 0;
}
.el-header,
.el-footer {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #d3dce6;
  color: #333;
  text-align: center;
  /* line-height: 200px; */
  height: calc(100vh - 60px);
}

.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  line-height: 160px;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
::v-deep .is-active {
  font-weight: bold;
  color: green !important;
}
</style>
